package com.crape.common.model;

import com.crape.common.constants.ConstantCode;
import com.crape.common.enums.AttentionType;
import com.crape.common.utils.StringUtil;

/**
 * 主题类
 * 
 * @author ChenKai 2012-11-4 下午12:29:49
 */
public class Subject {

    private Long    id;         // ID
    private Long    accountid;  // 用户ID
    private String  title;      // 标题
    private String  description; // 描述
    private Integer status;     // 状态：0=待发布，1=发布，-1=弃用
    private Long    attentions; // 被关注人数
    private Long	articles;	//文章数
    private String  imagename;  // 图片名称
    private String  image;       // 原图
    private String  createdate; // 创建时间
    private String  modifydate; // 修改时间
    private String  remark;     // 备注
    
    //===============================
    private Integer isattention = AttentionType.no.getCode(); // 是否被关注：0=未关注，1=已关注

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAccountid() {
        return accountid;
    }

    public void setAccountid(Long accountid) {
        this.accountid = accountid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getAttentions() {
        return attentions;
    }

    public void setAttentions(Long attentions) {
        this.attentions = attentions;
    }

    public Long getArticles() {
		return articles;
	}

	public void setArticles(Long articles) {
		this.articles = articles;
	}

	public String getImagename() {
		return imagename;
	}

	public void setImagename(String imagename) {
		this.imagename = imagename;
	}

	public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

	public String[] getImages() {
		return StringUtil.imagesUrl(imagename, ConstantCode.imageSize);
	}
	
	public String getCreatedate() {
        return StringUtil.getTimeStr(createdate);
    }

    public void setCreatedate(String createdate) {
        this.createdate = createdate;
    }

    public String getModifydate() {
        return StringUtil.getTimeStr(modifydate);
    }

    public void setModifydate(String modifydate) {
        this.modifydate = modifydate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

	public Integer getIsattention() {
		return isattention;
	}

	public void setIsattention(Integer isattention) {
		this.isattention = isattention;
	}

}
